<template>
    <div class="identity_y">
        <div class="title"><i class="el-icon-circle-check-outline"></i> 您已通过版权云实名认证</div>
        <div class="con">
            <el-form ref="identity_y" :model="identity_y" size="small" label-width="125px">
                <el-form-item label="证件名称">
                    {{ identity_y.auth_name }}
                </el-form-item>
                <el-form-item label="证件号码">
                    {{ identity_y.id_number }}
                </el-form-item>
            </el-form>
        </div>
    </div>
</template>

<script>
import { identityGet } from "@/api";
import { mapState, mapMutations } from "vuex";
export default {
    data() {
        return {
            user_id: null,
            identity_y: {
                auth_name: '',
                id_number: '',
            }
        };
    },
    mounted() {
        this.user_id = this.croUser.user_id || null;
        this.getInfo();
    },
    computed: {
        ...mapState(["croUser"])
    },
    methods: {
        ...mapMutations(["OUT_LOGIN"]),
        getInfo(){
            let para={
                user_id: this.user_id
            }
            identityGet(para).then(res=>{
                if(res.data){
                    this.identity_y = res.data;
                }else if(res.tologin) {
                    this.OUT_LOGIN();
                    this.$router.push('/login');
                }else {
                    this.$message.error(res.msg);
                }
            })
        }
    }
};
</script>
<style lang="scss" scoped>
.identity_y {
    margin: 30px auto;
    width: 300px;
    .title {
        text-align: center;
        color: #67C23A;
        font-size: 20px;
        padding-bottom:20px;
    }
}
</style>
